/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
 *
 */

import { TargetTaskService } from '../service/target-task-service.js';
import { HvigorConfigLoader } from '@ohos/hvigor';
import { CommonConst } from '../../const/common-const.js';

export const getOhosUiTransformOptimization = (taskService: TargetTaskService): boolean => {
  // 是hap、hsp或字节码har 则返回用户配置的
  if (taskService.isByteCodeHar()) {
    return true;
  }
  return HvigorConfigLoader.getInstance().getPropertiesConfigValue(CommonConst.OHOS_UI_TRANSFORM_OPTIMIZATION) === true;
};
